home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
libs
/
locatorlib.lha
/
locator
/
example
/
Locator_Example.bb2
next >
Wrap
Text File
|
1996-01-10
|
1KB
|
68 lines
;/*
;** This is a LOCATOR LIBRARY EXAMPLE
;**
;** Please, copy File Locator/Example/Locator.catalog To Ram:
;**
;** If the File is missgin, message will be in Italian! ;)
;**
;** This code is (C)Copyright 1996 Fabio Rotondo AND it is
;** placed in the Public Domain.
;**
;*/
;/* These conts were generated by LocConv ;) */
#MSG_ABOUT = 0
#MSG_MOMMY = 1
#MSG_HIEVERYBODY = 2
#MSG_COPYRIGHT = 3
Statement error{a$}
NPrint "*** ERROR: Could not open "+Chr$(34)+a$+Chr$(34)
End Statement
Function.s Loc_Msg{*hand.l, num.w, def$}
SHARED loclibinit
If *hand
*b.l = Loc_Message_(*hand, num, def$)
a$=Peek$(*b)
Else
a$ = def$
EndIf
Function Return a$
End Function
.MainPrg
*h.l = 0
If Loc_Init_()
*h=Loc_AllocHandler_()
If *h
If Loc_Open_(*h,"Ram:Locator.catalog")
error{"Ram:Locator.catalog"}
NPrint "Messages will be in Italian!"
NPrint ""
EndIf
NPrint "About Msg:" + Loc_Msg{*h, MSG_ABOUT, "Locator Library e' scritta da Fabio Rotondo."}
NPrint "MOMMY Msg:"+Loc_Msg{*h, MSG_MOMMY, "Ciao Mamma!"}
NPrint "Hi Everybody Msg:" + Loc_Msg{*h, MSG_HIEVERYBODY, "Ciao a Tutti!"}
NPrint "Copyright Msg:"+Loc_Msg{*h, MSG_COPYRIGHT, "Copyright di Fabio Rotondo"}
Loc_Close_ *h
Loc_FreeHandler_ *h
Else
error{"Handler"}
EndIf
Loc_Dispose_
Else
error{"Loc_Init()"}
EndIf
MouseWait
End